package com.aspose.cells;

final class zama {
   public static void a(zn var0, float var1, float var2, float var3, float var4, zalv var5) {
      if (var5.e()) {
         com.aspose.cells.b.a.b.zm var6 = a(var5);

         try {
            var0.b(var6, var1, var2, var3, var4);
         } finally {
            if (var6 != null) {
               var6.r();
            }

         }
      }

   }

   public static void a(zn var0, com.aspose.cells.b.a.b.zo var1, com.aspose.cells.b.a.b.zo var2, zalv var3) {
      a(var0, var1.d(), var1.e(), var2.d(), var2.e(), var3);
   }

   public static void a(zn var0, com.aspose.cells.b.a.b.zq var1, zalv var2) {
      b(var0, var1.f(), var1.g(), var1.h(), var1.i(), var2);
   }

   public static boolean a(com.aspose.cells.b.a.b.zo var0, com.aspose.cells.b.a.b.zq var1) {
      return var0.d() < var1.f() | var0.d() > var1.l() || var0.e() < var1.g() || var0.e() > var1.m();
   }

   public static void b(zn var0, float var1, float var2, float var3, float var4, zalv var5) {
      if (var5.f()) {
         com.aspose.cells.b.a.b.zm var6 = a(var5);

         try {
            var0.c(var6, var1, var2, var3, var4);
         } finally {
            if (var6 != null) {
               var6.r();
            }

         }
      }

   }

   public static com.aspose.cells.b.a.b.zm a(zalv var0) {
      float var1 = (float)var0.b().a();
      com.aspose.cells.b.a.b.zm var2 = new com.aspose.cells.b.a.b.zm(var0.a(), var1);
      if (var0.b().b() == 6) {
         var2.b(0);
      } else if (var0.b().b() == 0) {
         var2.b(5);
         if (var1 == 1.0F) {
            var2.a(new float[]{19.0F, 5.0F});
         } else if (var1 == 2.0F) {
            var2.a(new float[]{7.0F, 4.0F});
         } else if (var1 == 3.0F) {
            var2.a(new float[]{7.0F, 4.0F});
         }
      } else if (var0.b().b() == 10) {
         var2.b(5);
         if (var1 == 1.0F) {
            var2.a(new float[]{3.0F, 3.0F});
         } else if (var1 == 2.0F) {
            var2.a(new float[]{2.0F, 4.0F});
         } else if (var1 == 3.0F) {
            var2.a(new float[]{2.0F, 4.0F});
         }
      } else if (var0.b().b() == 1) {
         var2.b(5);
         if (var1 == 1.0F) {
            var2.a(new float[]{9.0F, 6.0F, 3.0F, 6.0F});
         } else if (var1 == 2.0F) {
            var2.a(new float[]{7.0F, 4.0F, 2.0F, 4.0F});
         } else if (var1 == 3.0F) {
            var2.a(new float[]{7.0F, 4.0F, 2.0F, 4.0F});
         }
      } else if (var0.b().b() == 9) {
         var2.b(5);
         if (var1 == 1.0F) {
            var2.a(new float[]{9.0F, 3.0F, 3.0F, 3.0F, 3.0F, 3.0F});
         } else if (var1 == 2.0F) {
            var2.a(new float[]{7.0F, 4.0F, 2.0F, 4.0F, 2.0F, 4.0F});
         } else if (var1 == 3.0F) {
            var2.a(new float[]{7.0F, 4.0F, 2.0F, 4.0F, 2.0F, 4.0F});
         }
      } else {
         Color var3;
         Color var4;
         com.aspose.cells.b.a.b.a.zg var5;
         if (var0.b().b() == 8) {
            var3 = Color.getBlack();
            var4 = Color.getWhite();
            var5 = new com.aspose.cells.b.a.b.a.zg(14, var3, var4);
            var2 = new com.aspose.cells.b.a.b.zm(var5, var1);
         } else if (var0.b().b() == 12) {
            var3 = Color.getBlack();
            var4 = Color.getWhite();
            var5 = new com.aspose.cells.b.a.b.a.zg(12, var3, var4);
            var2 = new com.aspose.cells.b.a.b.zm(var5, var1);
         } else if (var0.b().b() == 11) {
            var3 = Color.getBlack();
            var4 = Color.getWhite();
            var5 = new com.aspose.cells.b.a.b.a.zg(9, var3, var4);
            var2 = new com.aspose.cells.b.a.b.zm(var5, var1);
         } else {
            var2.b(0);
         }
      }

      return var2;
   }

   public static void a(zn var0, com.aspose.cells.b.a.b.zp var1, zalv var2) {
      com.aspose.cells.b.a.b.zq var3 = new com.aspose.cells.b.a.b.zq((float)var1.c(), (float)var1.d(), (float)var1.e(), (float)var1.f());
      a(var0, var3, var2);
   }

   public static boolean a(com.aspose.cells.b.a.b.zo var0, com.aspose.cells.b.a.b.zp var1) {
      com.aspose.cells.b.a.b.zq var2 = new com.aspose.cells.b.a.b.zq((float)var1.c(), (float)var1.d(), (float)var1.e(), (float)var1.f());
      return a(var0, var2);
   }
}
